<table class="table table-bordered table-striped my-3">
    <tbody>
    <tr>
        <th colspan="2" style="color: #007bff;">{{ ts('VALIDWARRANTYID') }}</th>
    </tr>
    <tr>
        <td class="tth">{{ ts('WARRANTYID') }}</td>
        <td>{{ @$v->warranty_id }}</td>
    </tr>
    @if(@$v->license_plate)
        <tr>
            <td>{{ ts('LICENSEPLATE') }}</td>
            <td>{{ @$v->license_plate }}</td>
        </tr>
    @endif
    <tr>
        <td>{{ ts('CUSTOMERNAME') }}</td>
        <td>{{ @$v->first_name }}</td>
    </tr>
    <tr>
        <td>{{ ts('MAKE') }}</td>
        <td>{{ ts('make_master.'.@$v->make_id) }}</td>
    </tr>
    <tr>
        <td>{{ ts('MODEL') }}</td>
        <td>
            {{ ts('model_master.'.@$v->model_id) ?: @$v->model_id }}
        </td>
    </tr>
    <tr>
        <td>{{ ts('YEAR') }}</td>
        <td>{{ @$v->year_id }}</td>
    </tr>
    @php
        $mRoll = gMR($v->id);
        $wPart = gWFP($v->id);
    @endphp
    @if(@$mRoll)
        <tr>
            <td class="tth">{{ ts('rollnumber') }}</td>
            <td class="ttd">{{ @$mRoll }}</td>
        </tr>
    @endif
    @empty($wPart)
    @else
        @foreach($wPart as $c)
            <tr>
                <td class="tth">{{ ts('ZTBW') }}</td>
                <td>{{ @$c->part }}</td>
            </tr>
            <tr>
                <td class="tth">{{ ts('filmtype') }}</td>
                <td>{{ @$c->film_type }}</td>
            </tr>
        @endforeach
    @endif
    <tr>
        <td>{{ ts('INSTALLATIONDATE') }}</td>
        <td>{{ fdate(@$v->installation_date) }}</td>
    </tr>
    <tr>
        <td>{{ ts('DMMC') }}</td>
        <td>{{ getWDName($v) }}</td>
    </tr>
    <tr>
        <td>{{ ts('CITY') }}</td>
        <td>{{ ts('cities.'.@$v->city) }}</td>
    </tr>
    <tr>
        <td colspan="2">
            <button class="btn btn-primary" onclick="getDetails('{{ @$v->warranty_id }}', '{{ substr(@$v->phone_number, -4) }}')">查看详情</button>
        </td>
    </tr>
    </tbody>
</table>